package cn.wolfcode.shop.redis.key;

/**
 * Created by wolfcode-lanxw
 */
public class BaseKeyPrefix implements KeyPrefix {
    private int expireSeconds;
    private String prefix;
    public BaseKeyPrefix(){}
    public BaseKeyPrefix(String prefix,int expireSeconds){
        this.prefix = prefix;
        this.expireSeconds = expireSeconds;
    }
    @Override
    public String getPrefix() {
        return this.getClass().getSimpleName()+":"+prefix;
    }

    @Override
    public int getExpireSeconds() {
        return this.expireSeconds;
    }
}
